#!/bin/bash

# 一、设置工作目录为fabric-samples/test-network
echo "一、设置工作目录为fabric-samples/test-network"
cd /root/03_project/04_fabric/fabric-samples/test-network || { echo "切换目录失败"; exit 1; }
sleep 0.1  # 暂停0.1秒
read -p "按Enter键继续..."

# ------------------------------------------

# 二、停止网络
echo "二、停止网络..."
./network.sh down
sleep 0.1  # 暂停0.1秒
read -p "按Enter键继续..."

# ------------------------------------------

# 三、启动网络、创建频道，并启用CA
echo "三、启动网络、创建频道，并启用CA..."
./network.sh up createChannel -c mychannel -ca
sleep 0.1  # 暂停0.1秒
read -p "按Enter键继续..."

# ------------------------------------------

# 四、部署链码
echo "四、部署链码..."
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go/ -ccl go
sleep 0.1  # 暂停0.1秒
read -p "按Enter键继续..."

# ------------------------------------------

# 五、设置工作目录为applicationa
echo "五、设置工作目录为applicationa"
cd /root/03_project/04_fabric/fabric-samples/asset-transfer-basic/application-go || { echo "切换目录失败"; exit 1; }
sleep 0.1  # 暂停0.1秒
read -p "按Enter键继续..."

# ------------------------------------------

# 六、运行应用程序
echo "六、运行应用程序..."
go run .
read -p "按Enter键继续..."

# ------------------------------------------

# 七、停止网络...
echo "七、停止网络..."
cd /root/03_project/04_fabric/fabric-samples/test-network 
./network.sh down
# 脚本结束
echo "脚本执行完成。"



ERROR  Failed to compile with 1 error                                                                                                                                  12:57:39 PM

This dependency was not found:

* svg-baker-runtime/browser-symbol in ./src/icons/svg/example.svg

To install it, you can run: npm install --save svg-baker-runtime/browser-symbol

./network.sh deployCC -ccn trace -ccp /root/02_project/03_project/fabric-eCert-trace-ipfs_ok-master/blockchain/chaincode -ccl go














http:///







#!/bin/bash
./stop.sh
# 要检查的镜像版本
image_versions=("2.5.9")

# 要检查的镜像列表
images=("hyperledger/fabric-tools" "hyperledger/fabric-peer" "hyperledger/fabric-orderer" "hyperledger/fabric-ccenv" "hyperledger/fabric-baseos")

# 遍历镜像列表
for image in "${images[@]}"
do
    for version in "${image_versions[@]}"
    do
        # 使用docker images命令查找特定镜像和版本
        if ! docker images -a | grep "$image" | grep "$version" &> /dev/null
        then
            echo "镜像 $image:$version 不存在，开始拉取..."
            docker pull "$image:$version"
        fi
    done
done


# 启动区块链网络、创建通道
./network.sh up createChannel
# 部署链码，使用basic链码
./network.sh deployCC -ccn trace -ccp ../chaincode -ccl go
cp -r organizations explorer/
# 启动mysql容器
#docker run --name fabrictrace-mysql -p 3337:3306 -e MYSQL_ROOT_PASSWORD=fabrictrace -d mysql:8
# 启动 IPFS
docker compose -f ipfs.yaml up -d
# 启动区块链浏览器
docker compose -f explorer/docker-compose.yaml up -d


cd /root/02_project/03_project/fabric-eCert-trace-ipfs_ok-master/application/web
pnpm run dev



启动节点
sleep 10
链码初始化
sleep 5

cd /root/02_project/03_project/fabric-eCert-trace-ipfs_ok-master && nohup ./run_fabirc_trace.sh

Element-Plus


https://www.axureshop.com/ys/1407




https://element-plus.org/zh-CN/


官方免费版：https://element.eleme.cn/#/zh-CN/resource

第三方扩展板：https://www.axureshop.com/a/1407.html 

